Level 0 | Level 1 | Level 2 | Level 3 | Level 4 |
Level 5 | Level 6 | Level 7 | Level 8 | Level 9 |
Level 10 | Level 11 | Level 12 | Level 13 | Level 14 |
LEVEL 4 Technos Japan Double Dragon 2 The Revenge
You might have noticed before that some companies have the same type of music driver. Sunsoft,Capcom,and Data East has about
the same type of music driver. You can rip these the same way everytime just about. There is another company that has the
same type of drivers and that's Technos Japan. However this rip will require you to work harder to make it play. I will
explain Double Dragon 2 in this level and River City Ransom in level 5.
Use nes2nsf to extract the NSF from the game. You will run into 2 banks 005 and 007. 005 is the bank you want, The reason is
because it has several writes to $4015. If you want you can verify it and disassemble each bank and look at them. You will
see a lot of sound code in bank 005 so that's what you go for.
So do what I explained in level 3 and disassemble bank 005 and remove the NSF header before you do so. Look around the code
for alittle bit and get familiar with it. I shall paste some code here and let you look at what we need to mess with in
order to get this rip to work.
$8000> 4C 2680: JMP $8026 ; $8003> 4C 9681: JMP $8196 ; $8006> 00: BRK ; $8007> 00: BRK ; $8008> 00: BRK ; $8009> 00: BRK ;
By using the header defaults and even switching the init and play addresses around to 8000/8003 will not get this rip to
work. This is an important part of the code and remember it. $8003 is indeed the play address and $8000 is the init
address. However you have to initialize some addresses and run some code to get this rip to work. Don't worry right now how
this was figured out.
So you will edit the code alittle bit starting out. Change this code JMP $8026 to JMP $8196. And after doing that change the
play address in the header to $8000. You switched the JMP's because you need to make it nice and neat for the following code.
8000 : 4C 46 81 JMP $8146 ; 8003 : 48 PHA ; 8004 : A9 00 LDA #$00 ; 8006 : 8D FF 07 STA $07FF ; 8009 : 20 20 80 JSR $8020 ; 800C : 68 PLA ; 800D : 8D FF 07 STA $07FF ; 8010 : EE FF 07 INC $07FF ; 8013 : A9 0F LDA #$0F ; 8015 : 8D 15 40 STA $4015 ; Sound Enable 8018 : 4C 20 80 JMP $8020
This is a complex bootstrap code and nicely made as well. You will notice that address $07FF is initialized and is the
address that is used to change the tune. So type in the code in a hex editor and change the init and play addresses in the
header to 8003/8000 and fire up the NSF and it plays.
Now what you do is arrange the tunes. Find some free space in the NSF and if you can't, you can tack on the code at the end
of the NSF since this one is a 16KB bank. Remember that the end of the bank in this case is $C000. After you have arranged
the tunes you will do something new and that's count the tunes and convert number to hex and type in the number in the
header at offset 06h. This is the entry in the header that tells you how many tunes you have. Don't forget to fill in the
name,composer, and company info in the header. Arranging the tunes is more then just moving sound effects. You can open the
game up and order the tunes based on what order they are played in the game.
This Level here you might have learned a few things. I'm giving you a break so that you don't have to learn too many things
here. You have a lot of catching up to do. The levels are going to get really hard soon slowly but surely, however you can
handle it. The next level will feature another Technos Japan game and is much like this one. So company formats are a lot
alike since most seem to use the same development kit in making the games and sound engines. Have fun listening to the rip.